package geektime.spring.autoconfiguredemo.model;


import java.util.List;

public class Coffe {

    private String username;
    private Integer password;
    private List<String> list;

    /**
     * 无参构造
     */
    public Coffe() {
    }

    /**
     * 通过构造器注入
     *
     * @param username
     * @param password
     * @param list
     */
    public Coffe(String username, Integer password, List<String> list) {
        this.username = username;
        this.password = password;
        this.list = list;
    }

    /**
     * 通过设置值的方式注入
     *
     * @param username
     */
    public void setUsername(String username) {
        this.username = username;
    }

    public void setPassword(Integer password) {
        this.password = password;
    }

    public void setList(List<String> list) {
        this.list = list;
    }

    //重写toString 使结果清晰明了
    @Override
    public String toString() {
        return "User [username=" + username + ", password=" + password + ", list=" + list + "]";
    }
}